<template>
	<view>
		<u-cell-group>
			<u-cell v-for="(item,index) in schoolList" :key="item.schoolId" :title="item.schoolName"
				@click="viewCheck(item)"></u-cell>
		</u-cell-group>
	</view>
</template>

<script>
	import {
		groupSchoolList
	} from "@/api/supervise/index.js"
	export default {
		data() {
			return {
				groupId: 0,
				activityId: 0,
				schoolList: []
			}
		},
		onLoad(option) {
			this.groupId = option.groupId;
			this.activityId = option.activityId;
			this.groupSchoolList();
		},
		methods: {
			viewCheck(item) {
				const queryData = {
					activityId: this.activityId,
					schoolId: item.schoolId,
					schoolName: item.schoolName,
				}
				this.$tab.navigateTo("/pages/work/supervisionGroupRecord/target-list?queryData=" + encodeURIComponent(JSON
					.stringify(queryData)));
			},
			groupSchoolList() {
				groupSchoolList(this.groupId).then(res => {
					this.schoolList = res.list;
				})
			}
		},
		onNavigationBarButtonTap(e) {
			// 点击导航栏自定义按钮
			this.$tab.navigateTo(
				`/pages/work/supervisionGroupRecord/statistics?groupId=${this.groupId}&activityId=${this.activityId}`);
		}
	}
</script>

<style lang="scss" scoped>
	.school-name {
		height: 6vh;
		line-height: 6vh;
		background-color: #FFFFFF;
		padding: 0 10px;
	}
</style>